# Maintainer: Antonio Rojas <arojas@archlinux.org>

_pipname=jupyterlab_widgets
pkgname=${_pipname/_/-}
pkgver=3.0.7
pkgrel=2
pkgdesc='JupyterLab extension to use ipywidgets'
arch=(any)
url='https://jupyter.org/'
license=(custom)
depends=(jupyterlab python-ipywidgets)
makedepends=(python-build python-installer python-setuptools python-jupyter_packaging)
source=(https://pypi.io/packages/source/${_pipname:0:1}/$_pipname/$_pipname-$pkgver.tar.gz)
sha256sums=('c3a50ed5bf528a0c7a869096503af54702f86dda1db469aee1c92dc0c01b43ca')

build() {
  cd $_pipname-$pkgver
  python -m build --wheel --skip-dependency-check --no-isolation
}

package() {
  cd $_pipname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
